package com.syq.personal.controller;



import com.syq.personal.dto.DTO;
import com.syq.personal.service.PersonalService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
public class PersonalController {



    @Resource
    PersonalService personalService;
    @RequestMapping("/personals")
    public DTO getAllJSon() throws Exception{
        return personalService.getAllPersonals();
    }

    @RequestMapping(value = "/personal/{pno}",method = RequestMethod.POST)
    public DTO getPersonalByPno(@PathVariable("pno")String pno) {
        return new DTO(200,"按学号查询");
    }

}
